#include<iostream>
#include<stdio.h>
#include<math.h>
using namespace std;

double n, p;

void solve() {
   double k = exp(log(p)/n);
   printf("%0.0f\n", k);   
}

void read() {
   while(cin >> n >> p)
      solve();
}

int main() {
   read();
   return 0;
}
